export function createRequireRole(config?: any) {
  return {
    required: true,
    message: '请填写',
    trigger: 'change',
    ...config,
  };
}

export function createPhoneRole() {
  return [
    {
      min: 11,
      max: 11,
      trigger: 'blur',
      message: '手机号应为11位',
    },
    { pattern: /^1\d{10}$/, message: '手机号格式不正确', trigger: 'blur' },
  ];
}
